]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Make checkAccessibleState() private
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 16 Dec 2024 14:04:18 +0000 (15:04 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 10 Jan 2025 11:46:33 +0000 (12:46 +0100)
Updating the accessible state is an internal business of the
class, so making it private is more appropriate.

Besides, it was never called from outside the class since it
was added in 2012, so it's unlikely we'll ever have a use case
for it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3576>
(cherry picked from commit 3421a3825a2ff8a35f0a2a3e7823f564d3746478)

js/ui/popupMenu.js

index ddd6ce7ed61e7d982c34cf43a82ba8bb9aa37050..5f94fcabda5eb573b42c5d576ba037dd5986bd70 100644 (file)
@@ -547,7 +547,7 @@ export const PopupSwitchMenuItem = GObject.registerClass({
         this.bind_property('reactive', this._switch, 'reactive', GObject.BindingFlags.SYNC_CREATE);
 
         this.accessible_role = Atk.Role.CHECK_MENU_ITEM;
-        this.checkAccessibleState();
+        this._checkAccessibleState();
         this.label_actor = this.label;
 
         this.add_child(this.label);
@@ -578,7 +578,7 @@ export const PopupSwitchMenuItem = GObject.registerClass({
             this.reactive = true;
             this.accessible_role = Atk.Role.CHECK_MENU_ITEM;
         }
-        this.checkAccessibleState();
+        this._checkAccessibleState();
     }
 
     activate(event) {
@@ -604,15 +604,15 @@ export const PopupSwitchMenuItem = GObject.registerClass({
 
     setToggleState(state) {
         this._switch.state = state;
-        this.checkAccessibleState();
+        this._checkAccessibleState();
     }
 
     _onToggled() {
         this.emit('toggled', this._switch.state);
-        this.checkAccessibleState();
+        this._checkAccessibleState();
     }
 
-    checkAccessibleState() {
+    _checkAccessibleState() {
         switch (this.accessible_role) {
         case Atk.Role.CHECK_MENU_ITEM:
             if (this._switch.state)